<script>
function origination_type(value)
{
  //alert($(".container2").html());
  if(value==2){
    $(".container2").show();
    $(".container3").show();
  }
  else
  {
    $(".container2").hide();
    $(".container3").hide();
  }
}
  
  $(function(){
    $(".originality_img1").on("change",function(){
		var file=this.files[0];
		if(this.files && file){
			var reader=new FileReader();
			reader.onload=function(e){
				$(".fileContainer1").attr("src",e.target.result);
              
			}
			reader.readAsDataURL(file);
		}
	});

    $(".originality_img2").on("change",function(){
		var file=this.files[0];
		if(this.files && file){
			var reader=new FileReader();
			reader.onload=function(e){
				$(".fileContainer2").attr("src",e.target.result);
              
			}
			reader.readAsDataURL(file);
		}
	});  

    $(".originality_img3").on("change",function(){
		var file=this.files[0];
		if(this.files && file){
			var reader=new FileReader();
			reader.onload=function(e){
				$(".fileContainer3").attr("src",e.target.result);
              
			}
			reader.readAsDataURL(file);
		}
	});
    
});
function return_message()
{
	<?php $input = M('input')->where(array('type_id'=>$type_id,'input_type_id'=>array('in','1,2,6,7,8'),'show_switch'=>2,'required_switch'=>2,'input_pid'=>array('exp','is null')))->order('date asc')->select();  foreach($input as $k=>$v){?>
	if($("#<?php echo $v['field_name'];?>").val()=='')
	{
		alert("<?php echo $v['prompt'];?>");
		return false;
	}
	<?php }?>
	<?php $input = M('input')->where(array('type_id'=>$type_id,'input_type_id'=>array('in','5'),'show_switch'=>2,'required_switch'=>2,'input_pid'=>array('exp','is null')))->order('date asc')->select();  foreach($input as $k=>$v){?>
	if(typeof($("input:radio[name='data[<?php echo $v['field_name'];?>]']:checked").val())=='undefined')
	{
		alert("<?php echo $v['prompt'];?>");
		return false;
	}
	<?php }?>
	<?php $input = M('input')->where(array('type_id'=>$type_id,'input_type_id'=>array('in','4'),'show_switch'=>2,'required_switch'=>2,'input_pid'=>array('exp','is null')))->order('date asc')->select();  foreach($input as $k=>$v){?>
	if(!$("input:checkbox[name='data[<?php echo $v['field_name'];?>][]']").is(':checked'))
	{
		alert("<?php echo $v['prompt'];?>");
		return false;
	}
	<?php }?>
  <?php if($type_id==65){?>
  if($("#down").val()=='' && $("#h5url").val()=='')
  {
    alert("下载链接与H5链接至少填写一项");
    return false;
  }
  <?php }?>
  <?php if($type_id==63){?>
  if($("input:radio[name='data[isys]']:checked").val()=='2')
  {
    if($("#ys").val()=='')
	{
		alert("请填写预算金额");
    	return false;
    }
  }
  <?php }?>
}
</script>
<div class="g-ft"> <?php echo $site['inscribe'];?> </div>
<?php require APP_ROOT.'public/foot.php';?>
